home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / metal / MetalFileChooserUI$4.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  3.2 KB  |  72 lines

  1. package javax.swing.plaf.metal;
  2.  
  3. import java.beans.PropertyChangeEvent;
  4. import java.beans.PropertyChangeListener;
  5. import java.io.File;
  6. import javax.swing.JComponent;
  7. import javax.swing.JFileChooser;
  8. import javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxModel;
  9.  
  10. final class MetalFileChooserUI$4 implements PropertyChangeListener {
  11.    // $FF: synthetic field
  12.    private final MetalFileChooserUI this$0;
  13.  
  14.    // $FF: synthetic method
  15.    MetalFileChooserUI$4(MetalFileChooserUI var1) {
  16.       this.this$0 = var1;
  17.    }
  18.  
  19.    public void propertyChange(PropertyChangeEvent var1) {
  20.       String var2 = var1.getPropertyName();
  21.       if (var2.equals("SelectedFileChangedProperty")) {
  22.          MetalFileChooserUI.access$2(this.this$0);
  23.          File var3 = (File)var1.getNewValue();
  24.          if (var3 != null) {
  25.             this.this$0.setFileName(this.this$0.getFileChooser().getName(var3));
  26.          } else {
  27.             this.this$0.setFileName((String)null);
  28.          }
  29.  
  30.          this.this$0.setFileSelected();
  31.       } else if (var2.equals("directoryChanged")) {
  32.          MetalFileChooserUI.access$2(this.this$0);
  33.          MetalFileChooserUI.access$3(this.this$0);
  34.          this.this$0.clearIconCache();
  35.          MetalFileChooserUI.access$4(this.this$0).clearSelection();
  36.          File var4 = this.this$0.getFileChooser().getCurrentDirectory();
  37.          if (var4 != null) {
  38.             DirectoryComboBoxModel.access$0(MetalFileChooserUI.access$5(this.this$0), var4);
  39.             this.this$0.getNewFolderAction().setEnabled(var4.canWrite());
  40.          }
  41.       } else if (!var2.equals("fileFilterChanged") && !var2.equals("fileSelectionChanged")) {
  42.          if (var2 == "AccessoryChangedProperty") {
  43.             if (this.this$0.getAccessoryPanel() != null) {
  44.                if (var1.getOldValue() != null) {
  45.                   this.this$0.getAccessoryPanel().remove((JComponent)var1.getOldValue());
  46.                }
  47.  
  48.                JComponent var5 = (JComponent)var1.getNewValue();
  49.                if (var5 != null) {
  50.                   this.this$0.getAccessoryPanel().add(var5, "Center");
  51.                }
  52.             }
  53.          } else if (var2 != "ApproveButtonTextChangedProperty" && var2 != "DialogTypeChangedProperty") {
  54.             if (var2.equals("ApproveButtonMnemonicChangedProperty")) {
  55.                MetalFileChooserUI.access$0(this.this$0).setMnemonic(this.this$0.getApproveButtonMnemonic(this.this$0.getFileChooser()));
  56.             }
  57.          } else {
  58.             JFileChooser var6 = this.this$0.getFileChooser();
  59.             MetalFileChooserUI.access$0(this.this$0).setText(this.this$0.getApproveButtonText(var6));
  60.             MetalFileChooserUI.access$0(this.this$0).setToolTipText(this.this$0.getApproveButtonToolTipText(var6));
  61.             MetalFileChooserUI.access$0(this.this$0).setMnemonic(this.this$0.getApproveButtonMnemonic(var6));
  62.          }
  63.       } else {
  64.          MetalFileChooserUI.access$2(this.this$0);
  65.          MetalFileChooserUI.access$3(this.this$0);
  66.          this.this$0.clearIconCache();
  67.          MetalFileChooserUI.access$4(this.this$0).clearSelection();
  68.       }
  69.  
  70.    }
  71. }
  72.